package InterfaceUno;

import java.awt.Font;
import java.awt.TextField;
import javax.swing.JOptionPane;
import javax.swing.JTable;
import java.util.LinkedList;
import javax.swing.JTextField;

import View.viewAbout;
import View.viewDificultad;
import View.viewInfoSudoku;
import View.viewIntrucciones;
import View.viewSave;
import View.viewTopTen;
import Controller.Controller;
import InterfaceDos.viewDos;
/*
 * viewOne.java
 *
 * Created on Oct 18, 2012, 11:45:01 PM
 */
/**
 *
 * @author Administrator
 */
public final class viewOne extends javax.swing.JFrame {
    LinkedList<java.awt.TextField> ListtextField=new LinkedList();
    
    viewDificultad VD =new viewDificultad();
    viewTopTen VTT = new viewTopTen();
    Controller controller;
    /** Creates new form viewOne */
    public viewOne() {
        initComponents();
        setTexFieldInList();
        controller= new Controller();
        this.setVisible(true);
        
    }
    public String getDificultad(){
        return VD.getDificultad();
    }
        
    public void setTable(JTable a){
        VTT.setTable(a);
    }
    public void setTexFieldInList(){
       ListtextField.add(celda1);
       ListtextField.add(celda2);
       ListtextField.add(celda3);
       ListtextField.add(celda4);
       ListtextField.add(celda5);
       ListtextField.add(celda6);
       ListtextField.add(celda7);
       ListtextField.add(celda8);
       ListtextField.add(celda9);
       ListtextField.add(celda10);
       ListtextField.add(celda11);
       ListtextField.add(celda12);
       ListtextField.add(celda13);
       ListtextField.add(celda14);
       ListtextField.add(celda15);
       ListtextField.add(celda16);
       ListtextField.add(celda17);
       ListtextField.add(celda18);
       ListtextField.add(celda19);
       ListtextField.add(celda20);
       ListtextField.add(celda21);
       ListtextField.add(celda22);
       ListtextField.add(celda23);
       ListtextField.add(celda24);
       ListtextField.add(celda25);
       ListtextField.add(celda26);
       ListtextField.add(celda27);
       ListtextField.add(celda28);
       ListtextField.add(celda29);
       ListtextField.add(celda30);
       ListtextField.add(celda31);
       ListtextField.add(celda32);
       ListtextField.add(celda33);
       ListtextField.add(celda34);
       ListtextField.add(celda35);
       ListtextField.add(celda36);
       ListtextField.add(celda37);
       ListtextField.add(celda38);
       ListtextField.add(celda39);
       ListtextField.add(celda40);
       ListtextField.add(celda41);
       ListtextField.add(celda42);
       ListtextField.add(celda43);
       ListtextField.add(celda44);
       ListtextField.add(celda45);
       ListtextField.add(celda46);
       ListtextField.add(celda47);
       ListtextField.add(celda48);
       ListtextField.add(celda49);
       ListtextField.add(celda50);
       ListtextField.add(celda51);
       ListtextField.add(celda52);
       ListtextField.add(celda53);
       ListtextField.add(celda54);
       ListtextField.add(celda55);
       ListtextField.add(celda56);
       ListtextField.add(celda57);
       ListtextField.add(celda58);
       ListtextField.add(celda59);
       ListtextField.add(celda60);
       ListtextField.add(celda61);
       ListtextField.add(celda62);
       ListtextField.add(celda63);
       ListtextField.add(celda64);
       ListtextField.add(celda65);
       ListtextField.add(celda66);
       ListtextField.add(celda67);
       ListtextField.add(celda68);
       ListtextField.add(celda69);
       ListtextField.add(celda70);
       ListtextField.add(celda71);
       ListtextField.add(celda72);
       ListtextField.add(celda73);
       ListtextField.add(celda74);
       ListtextField.add(celda75);
       ListtextField.add(celda76);
       ListtextField.add(celda77);
       ListtextField.add(celda78);
       ListtextField.add(celda79);
       ListtextField.add(celda80);
       ListtextField.add(celda81);
   }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
    	setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        jPanel1 = new javax.swing.JPanel();
        celda10 = new java.awt.TextField();
        celda1 = new java.awt.TextField();
        celda11 = new java.awt.TextField();
        celda2 = new java.awt.TextField();
        celda4 = new java.awt.TextField();
        celda13 = new java.awt.TextField();
        celda12 = new java.awt.TextField();
        celda3 = new java.awt.TextField();
        celda14 = new java.awt.TextField();
        celda5 = new java.awt.TextField();
        celda6 = new java.awt.TextField();
        celda15 = new java.awt.TextField();
        celda16 = new java.awt.TextField();
        celda7 = new java.awt.TextField();
        celda8 = new java.awt.TextField();
        celda9 = new java.awt.TextField();
        celda18 = new java.awt.TextField();
        celda17 = new java.awt.TextField();
        celda27 = new java.awt.TextField();
        celda36 = new java.awt.TextField();
        celda35 = new java.awt.TextField();
        celda26 = new java.awt.TextField();
        celda25 = new java.awt.TextField();
        celda34 = new java.awt.TextField();
        celda33 = new java.awt.TextField();
        celda24 = new java.awt.TextField();
        celda23 = new java.awt.TextField();
        celda32 = new java.awt.TextField();
        celda22 = new java.awt.TextField();
        celda31 = new java.awt.TextField();
        celda21 = new java.awt.TextField();
        celda20 = new java.awt.TextField();
        celda19 = new java.awt.TextField();
        celda28 = new java.awt.TextField();
        celda29 = new java.awt.TextField();
        celda30 = new java.awt.TextField();
        celda54 = new java.awt.TextField();
        celda45 = new java.awt.TextField();
        celda44 = new java.awt.TextField();
        celda53 = new java.awt.TextField();
        celda43 = new java.awt.TextField();
        celda52 = new java.awt.TextField();
        celda42 = new java.awt.TextField();
        celda51 = new java.awt.TextField();
        celda41 = new java.awt.TextField();
        celda50 = new java.awt.TextField();
        celda40 = new java.awt.TextField();
        celda49 = new java.awt.TextField();
        celda39 = new java.awt.TextField();
        celda48 = new java.awt.TextField();
        celda38 = new java.awt.TextField();
        celda47 = new java.awt.TextField();
        celda46 = new java.awt.TextField();
        celda37 = new java.awt.TextField();
        celda63 = new java.awt.TextField();
        celda62 = new java.awt.TextField();
        celda61 = new java.awt.TextField();
        celda60 = new java.awt.TextField();
        celda59 = new java.awt.TextField();
        celda58 = new java.awt.TextField();
        celda57 = new java.awt.TextField();
        celda56 = new java.awt.TextField();
        celda55 = new java.awt.TextField();
        celda72 = new java.awt.TextField();
        celda71 = new java.awt.TextField();
        celda70 = new java.awt.TextField();
        celda69 = new java.awt.TextField();
        celda68 = new java.awt.TextField();
        celda67 = new java.awt.TextField();
        celda66 = new java.awt.TextField();
        celda65 = new java.awt.TextField();
        celda64 = new java.awt.TextField();
        celda73 = new java.awt.TextField();
        celda74 = new java.awt.TextField();
        celda75 = new java.awt.TextField();
        celda76 = new java.awt.TextField();
        celda77 = new java.awt.TextField();
        celda78 = new java.awt.TextField();
        celda79 = new java.awt.TextField();
        celda80 = new java.awt.TextField();
        celda81 = new java.awt.TextField();
        termine = new javax.swing.JButton();
        cambiarInterfaz = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        archivo = new javax.swing.JMenu();
        NP = new javax.swing.JMenuItem();
        cargarPartida = new javax.swing.JMenuItem();
        GP = new javax.swing.JMenuItem();
        elegirDif = new javax.swing.JMenuItem();
        topTen = new javax.swing.JMenuItem();
        Reiniciar = new javax.swing.JMenuItem();
        informacion = new javax.swing.JMenu();
        Int = new javax.swing.JMenuItem();
        IS = new javax.swing.JMenuItem();
        Resolver = new javax.swing.JMenuItem();
        jMenuItem2 = new javax.swing.JMenuItem();
        ayuda = new javax.swing.JMenu();
        verificar = new javax.swing.JMenuItem();
        Sugerir = new javax.swing.JMenuItem();

        setTitle("Sudokus");
        setAlwaysOnTop(true);
        setResizable(false);

        jPanel1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

        celda4.setBackground(new java.awt.Color(244, 117, 117));

        celda13.setBackground(new java.awt.Color(244, 117, 117));

        celda14.setBackground(new java.awt.Color(244, 117, 117));

        celda5.setBackground(new java.awt.Color(244, 117, 117));

        celda6.setBackground(new java.awt.Color(244, 117, 117));

        celda15.setBackground(new java.awt.Color(244, 117, 117));

        celda36.setBackground(new java.awt.Color(244, 117, 117));

        celda35.setBackground(new java.awt.Color(244, 117, 117));

        celda34.setBackground(new java.awt.Color(244, 117, 117));

        celda24.setBackground(new java.awt.Color(244, 117, 117));

        celda23.setBackground(new java.awt.Color(244, 117, 117));
        
        celda22.setBackground(new java.awt.Color(244, 117, 117));

        celda28.setBackground(new java.awt.Color(244, 117, 117));

        celda29.setBackground(new java.awt.Color(244, 117, 117));

        celda30.setBackground(new java.awt.Color(244, 117, 117));

        celda54.setBackground(new java.awt.Color(244, 117, 117));

        celda45.setBackground(new java.awt.Color(244, 117, 117));

        celda44.setBackground(new java.awt.Color(244, 117, 117));

        celda53.setBackground(new java.awt.Color(244, 117, 117));

        celda43.setBackground(new java.awt.Color(244, 117, 117));

        celda52.setBackground(new java.awt.Color(244, 117, 117));

        celda39.setBackground(new java.awt.Color(244, 117, 117));

        celda48.setBackground(new java.awt.Color(244, 117, 117));

        celda38.setBackground(new java.awt.Color(244, 117, 117));

        celda47.setBackground(new java.awt.Color(244, 117, 117));

        celda46.setBackground(new java.awt.Color(244, 117, 117));

        celda37.setBackground(new java.awt.Color(244, 117, 117));

        celda60.setBackground(new java.awt.Color(244, 117, 117));
        celda60.setEditable(false);

        celda59.setBackground(new java.awt.Color(244, 117, 117));
        celda59.setEditable(false);

        celda58.setBackground(new java.awt.Color(244, 117, 117));
        celda58.setEditable(false);

        celda69.setBackground(new java.awt.Color(244, 117, 117));
        celda69.setEditable(false);

        celda68.setBackground(new java.awt.Color(244, 117, 117));
        celda68.setEditable(false);

        celda67.setBackground(new java.awt.Color(244, 117, 117));
        celda67.setEditable(false);

        celda76.setBackground(new java.awt.Color(244, 117, 117));
        celda76.setEditable(false);

        celda77.setBackground(new java.awt.Color(244, 117, 117));
        celda77.setEditable(false);

        celda78.setBackground(new java.awt.Color(244, 117, 117));
        celda78.setEditable(false);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(celda1, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(celda10, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(celda2, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(celda11, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(1, 1, 1)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(celda3, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(celda12, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(celda4, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(celda13, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(celda5, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(celda14, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(celda6, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(celda15, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(1, 1, 1)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(celda7, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(celda16, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(celda8, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(celda17, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(celda9, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(celda18, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)))
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(celda19, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(celda28, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(celda20, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(celda29, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(1, 1, 1)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(celda21, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(celda30, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(celda22, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(celda31, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(celda23, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(celda32, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(celda24, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(celda33, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(1, 1, 1)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(celda25, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(celda34, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(celda26, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(celda35, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(celda27, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(celda36, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)))
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(celda37, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(celda46, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(celda38, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(celda47, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(1, 1, 1)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(celda39, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(celda48, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(celda40, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(celda49, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(celda41, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(celda50, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(celda42, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(celda51, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(1, 1, 1)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(celda43, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(celda52, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(celda44, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(celda53, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(celda45, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(celda54, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)))
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(celda55, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(2, 2, 2)
                .addComponent(celda56, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(1, 1, 1)
                .addComponent(celda57, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(2, 2, 2)
                .addComponent(celda58, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(2, 2, 2)
                .addComponent(celda59, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(2, 2, 2)
                .addComponent(celda60, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(1, 1, 1)
                .addComponent(celda61, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(2, 2, 2)
                .addComponent(celda62, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(2, 2, 2)
                .addComponent(celda63, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(celda64, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(2, 2, 2)
                .addComponent(celda65, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(1, 1, 1)
                .addComponent(celda66, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(2, 2, 2)
                .addComponent(celda67, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(2, 2, 2)
                .addComponent(celda68, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(2, 2, 2)
                .addComponent(celda69, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(1, 1, 1)
                .addComponent(celda70, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(2, 2, 2)
                .addComponent(celda71, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(2, 2, 2)
                .addComponent(celda72, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(celda73, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(2, 2, 2)
                .addComponent(celda74, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(1, 1, 1)
                .addComponent(celda75, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(2, 2, 2)
                .addComponent(celda76, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(2, 2, 2)
                .addComponent(celda77, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(2, 2, 2)
                .addComponent(celda78, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(1, 1, 1)
                .addComponent(celda79, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(2, 2, 2)
                .addComponent(celda80, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(2, 2, 2)
                .addComponent(celda81, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(celda9, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(1, 1, 1)
                                .addComponent(celda18, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(celda8, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(1, 1, 1)
                                .addComponent(celda17, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(jPanel1Layout.createSequentialGroup()
                            .addComponent(celda7, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(1, 1, 1)
                            .addComponent(celda16, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(celda6, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(1, 1, 1)
                                .addComponent(celda15, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(celda5, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(1, 1, 1)
                                .addComponent(celda14, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(celda4, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(1, 1, 1)
                                .addComponent(celda13, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(celda3, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(1, 1, 1)
                                .addComponent(celda12, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(celda2, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(1, 1, 1)
                                .addComponent(celda11, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(celda1, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(1, 1, 1)
                                .addComponent(celda10, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addGap(1, 1, 1)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(celda27, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(1, 1, 1)
                                .addComponent(celda36, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(celda26, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(1, 1, 1)
                                .addComponent(celda35, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(jPanel1Layout.createSequentialGroup()
                            .addComponent(celda25, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(1, 1, 1)
                            .addComponent(celda34, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(celda24, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(1, 1, 1)
                                .addComponent(celda33, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(celda23, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(1, 1, 1)
                                .addComponent(celda32, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(celda22, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(1, 1, 1)
                                .addComponent(celda31, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(celda21, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(1, 1, 1)
                                .addComponent(celda30, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(celda20, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(1, 1, 1)
                                .addComponent(celda29, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(celda19, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(1, 1, 1)
                                .addComponent(celda28, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addGap(1, 1, 1)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(celda45, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(1, 1, 1)
                                .addComponent(celda54, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(celda44, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(1, 1, 1)
                                .addComponent(celda53, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(jPanel1Layout.createSequentialGroup()
                            .addComponent(celda43, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(1, 1, 1)
                            .addComponent(celda52, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(celda42, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(1, 1, 1)
                                .addComponent(celda51, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(celda41, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(1, 1, 1)
                                .addComponent(celda50, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(celda40, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(1, 1, 1)
                                .addComponent(celda49, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(celda39, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(1, 1, 1)
                                .addComponent(celda48, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(celda38, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(1, 1, 1)
                                .addComponent(celda47, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(celda37, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(1, 1, 1)
                                .addComponent(celda46, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addGap(1, 1, 1)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(celda63, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(celda62, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addComponent(celda61, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(celda60, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(celda59, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(celda58, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(celda57, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(celda56, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(celda55, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(1, 1, 1)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(celda72, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(celda71, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addComponent(celda70, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(celda69, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(celda68, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(celda67, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(celda66, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(celda65, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(celda64, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(1, 1, 1)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(celda81, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(celda80, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addComponent(celda79, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(celda78, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(celda77, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(celda76, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(celda75, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(celda74, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(celda73, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(20, Short.MAX_VALUE))
        );

        termine.setText("Termine???");
        termine.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                termineActionPerformed(evt);
            }
        });

        cambiarInterfaz.setText("Cambiar Interfaz");
        cambiarInterfaz.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cambiarInterfazActionPerformed(evt);
            }
        });

        jLabel1.setText("(Opcion para comprobar si ha finalizado el juego)");

        archivo.setText("Archivo");

        NP.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_J, java.awt.event.InputEvent.CTRL_MASK));
        NP.setText("Nueva Partida");
        NP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                NPActionPerformed(evt);
            }
        });
        archivo.add(NP);

        cargarPartida.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.CTRL_MASK));
        cargarPartida.setText("Cargar Partida");
        cargarPartida.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
            	cargarPartidaActionPerformed(evt);
            }
        });
        archivo.add(cargarPartida);

        GP.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));
        GP.setText("Guardar Partida");
        GP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                GPActionPerformed(evt);
            }
        });
        archivo.add(GP);

        elegirDif.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_D, java.awt.event.InputEvent.CTRL_MASK));
        elegirDif.setText("Nivel de Dificultad");
        elegirDif.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
            	elegirDifActionPerformed(evt);
            }
        });
        archivo.add(elegirDif);

        topTen.setText("Top Ten");
        topTen.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
            	topTenActionPerformed(evt);
            }
        });
        archivo.add(topTen);

        Reiniciar.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_W, java.awt.event.InputEvent.CTRL_MASK));
        Reiniciar.setText("Reiniciar");
        Reiniciar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ReiniciarActionPerformed(evt);
            }
        });
        archivo.add(Reiniciar);

        jMenuBar1.add(archivo);

        informacion.setText("Extras");
        informacion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                informacionActionPerformed(evt);
            }
        });

        Int.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_I, java.awt.event.InputEvent.CTRL_MASK));
        Int.setText("Intrucciones");
        Int.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                IntActionPerformed(evt);
            }
        });
        informacion.add(Int);

        IS.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));
        IS.setText("Informacion del Sudoku");
        IS.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ISActionPerformed(evt);
            }
        });
        informacion.add(IS);

        Resolver.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.CTRL_MASK));
        Resolver.setText("Resolver");
        Resolver.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ResolverActionPerformed(evt);
            }
        });
        informacion.add(Resolver);

        jMenuItem2.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_T, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem2.setText("About Sudoku");
        jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
            	setAlwaysOnTop(true);

                jMenuItem2ActionPerformed(evt);
            }
        });
        informacion.add(jMenuItem2);

        jMenuBar1.add(informacion);

        ayuda.setText("Ayuda");
        ayuda.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ayudaActionPerformed(evt);
            }
        });

        verificar.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_V, java.awt.event.InputEvent.CTRL_MASK));
        verificar.setText("Verificar");
        verificar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                verificarActionPerformed(evt);
            }
        });
        ayuda.add(verificar);

        Sugerir.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));
        Sugerir.setText("Sugerir");
        Sugerir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SugerirActionPerformed(evt);
            }
        });
        ayuda.add(Sugerir);

        jMenuBar1.add(ayuda);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(155, 155, 155)
                        .addComponent(jLabel1))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(232, 232, 232)
                        .addComponent(termine))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(39, 39, 39)
                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(223, 223, 223)
                        .addComponent(cambiarInterfaz)))
                .addContainerGap(44, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(cambiarInterfaz, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(10, 10, 10)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(termine, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel1)
                .addContainerGap(15, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

private void ResolverActionPerformed(java.awt.event.ActionEvent evt) {
	setTablero(controller.resolver());
}    
    
private void cargarPartidaActionPerformed(java.awt.event.ActionEvent evt) {
	setTablero(controller.cargar());
}

    
private void GPActionPerformed(java.awt.event.ActionEvent evt) {
	controller.guardarPartida(getTablero());
	JOptionPane.showMessageDialog(this, "La partida se ha guardado correctamente.", "",JOptionPane.WARNING_MESSAGE);
}

private void NPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_NPActionPerformed
	setTablero(controller.nuevoJuego(getDificultad()));
}

private void ReiniciarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SActionPerformed
	setTablero(controller.restart());
}//GEN-LAST:event_SActionPerformed

private void elegirDifActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
    VD.setVisible(true);
}//GEN-LAST:event_jMenuItem1ActionPerformed

private void IntActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_IntActionPerformed
    viewIntrucciones VI= new viewIntrucciones();
    VI.setVisible(true);
}//GEN-LAST:event_IntActionPerformed

private void ISActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ISActionPerformed
    viewInfoSudoku VIS =new viewInfoSudoku();
    VIS.setVisible(true);
}//GEN-LAST:event_ISActionPerformed

private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
    viewAbout VA =new viewAbout();
    VA.setVisible(true);
}//GEN-LAST:event_jMenuItem2ActionPerformed

private void informacionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_informacionActionPerformed
    VTT.setVisible(true);
}//GEN-LAST:event_informacionActionPerformed

private void topTenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TTActionPerformed
	viewTopTen view = new viewTopTen();
	view.setTable(controller.topTen());
	view.setVisible(true);
}//GEN-LAST:event_TTActionPerformed

private void ayudaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ayudaActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_ayudaActionPerformed

private void verificarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_verificarActionPerformed
	int[] array = controller.compobar(getTablero());
	if (array[0]==0)
		JOptionPane.showMessageDialog(this, "La posicion ("+array[1]+","+array[2]+") "+"esta mal.", "",JOptionPane.WARNING_MESSAGE);
	else
		JOptionPane.showMessageDialog(this,"No hay posiciones erroneas.", "",JOptionPane.WARNING_MESSAGE);	
}//GEN-LAST:event_verificarActionPerformed

private void SugerirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SugerirActionPerformed
	setTablero(controller.sugerirJugada(getTablero()));
	//System.out.println(controller.sugerirJugada(getTablero()));
}//GEN-LAST:event_SugerirActionPerformed

private void termineActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_termineActionPerformed
	int[] array = controller.compobar(getTablero());
	if (array[0]==0)
		JOptionPane.showMessageDialog(this, "La posicin ("+array[1]+","+array[2]+") "+"esta mal.", "",JOptionPane.WARNING_MESSAGE);
	else{
		if (!aux())
			JOptionPane.showMessageDialog(this, "Tiene casilleros sin completar", "",JOptionPane.WARNING_MESSAGE);
		else{
			controller.terminoTiempo();
			viewSave view = new viewSave(controller);
			view.setVisible(true);
		}
	}
}//GEN-LAST:event_termineActionPerformed
private boolean aux(){
	boolean a=true;
	for(int i=0;i<(ListtextField.size()-1);i++){
		if (ListtextField.get(i).getText().compareTo(" ")==0)
			a=false;
	}
	return a;
}

private void cambiarInterfazActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cambiarInterfazActionPerformed
	int[] array = controller.compobar(getTablero());
	if (array[0]==0)
		JOptionPane.showMessageDialog(this, "La posicin ("+array[1]+","+array[2]+") "+"esta mal, no se " +
											"puede cambiar de interfaz.", "",JOptionPane.WARNING_MESSAGE);
	else{
		viewDos vista2 = new viewDos();
		vista2.setTablero(getTablero());
		vista2.setController(controller);
		this.setVisible(false);
		vista2.setVisible(true);
	}
}//GEN-LAST:event_cambiarInterfazActionPerformed

	public void setController(Controller cont){
		controller = cont;
	}

	public String[][] getTablero(){
		String[][] m = new String[9][9];
		int cont = 0;  
		for (int f=0; f<9; f++){
            for (int c=0; c<9; c++){
            	if (ListtextField.get(cont).getText().compareTo(" ")!=0){
            		m[f][c] = ListtextField.get(cont).getText().trim();
               	} else
               		m[f][c] = "0";
            	cont++;
            }
		}
		return m;
	}

	public void setTablero(String[][] matriz){
		//Semilla
		Font font1 = new Font("Verdana", Font.BOLD, 30);
		//noSemilla
		Font font2 = new Font("Verdana", Font.PLAIN, 31);

		int cont = 0;
		TextField asd;
		for(int i=0;i<9;i++){
			for(int j=0;j<9;j++){
				if ((matriz[i][j])!="0"){
					asd = ListtextField.get(cont);
					asd.setFont(font1);
					asd.setText(matriz[i][j]);
					asd.setEditable(false);
					ListtextField.set(cont,asd);
				}else{
					asd = ListtextField.get(cont);
					asd.setFont(font2);
					asd.setText(" ");
					asd.setEditable(true);
				}
				cont++;
			}
		}
	}

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuItem GP;
    private javax.swing.JMenuItem IS;
    private javax.swing.JMenuItem Int;
    private javax.swing.JMenuItem NP;
    private javax.swing.JMenuItem Reiniciar;
    private javax.swing.JMenuItem Resolver;
    private javax.swing.JMenuItem Sugerir;
    private javax.swing.JMenuItem topTen;
    private javax.swing.JMenu archivo;
    private javax.swing.JMenu ayuda;
    private javax.swing.JButton cambiarInterfaz;
    private javax.swing.JMenuItem cargarPartida;
    private java.awt.TextField celda1;
    private java.awt.TextField celda10;
    private java.awt.TextField celda11;
    private java.awt.TextField celda12;
    private java.awt.TextField celda13;
    private java.awt.TextField celda14;
    private java.awt.TextField celda15;
    private java.awt.TextField celda16;
    private java.awt.TextField celda17;
    private java.awt.TextField celda18;
    private java.awt.TextField celda19;
    private java.awt.TextField celda2;
    private java.awt.TextField celda20;
    private java.awt.TextField celda21;
    private java.awt.TextField celda22;
    private java.awt.TextField celda23;
    private java.awt.TextField celda24;
    private java.awt.TextField celda25;
    private java.awt.TextField celda26;
    private java.awt.TextField celda27;
    private java.awt.TextField celda28;
    private java.awt.TextField celda29;
    private java.awt.TextField celda3;
    private java.awt.TextField celda30;
    private java.awt.TextField celda31;
    private java.awt.TextField celda32;
    private java.awt.TextField celda33;
    private java.awt.TextField celda34;
    private java.awt.TextField celda35;
    private java.awt.TextField celda36;
    private java.awt.TextField celda37;
    private java.awt.TextField celda38;
    private java.awt.TextField celda39;
    private java.awt.TextField celda4;
    private java.awt.TextField celda40;
    private java.awt.TextField celda41;
    private java.awt.TextField celda42;
    private java.awt.TextField celda43;
    private java.awt.TextField celda44;
    private java.awt.TextField celda45;
    private java.awt.TextField celda46;
    private java.awt.TextField celda47;
    private java.awt.TextField celda48;
    private java.awt.TextField celda49;
    private java.awt.TextField celda5;
    private java.awt.TextField celda50;
    private java.awt.TextField celda51;
    private java.awt.TextField celda52;
    private java.awt.TextField celda53;
    private java.awt.TextField celda54;
    private java.awt.TextField celda55;
    private java.awt.TextField celda56;
    private java.awt.TextField celda57;
    private java.awt.TextField celda58;
    private java.awt.TextField celda59;
    private java.awt.TextField celda6;
    private java.awt.TextField celda60;
    private java.awt.TextField celda61;
    private java.awt.TextField celda62;
    private java.awt.TextField celda63;
    private java.awt.TextField celda64;
    private java.awt.TextField celda65;
    private java.awt.TextField celda66;
    private java.awt.TextField celda67;
    private java.awt.TextField celda68;
    private java.awt.TextField celda69;
    private java.awt.TextField celda7;
    private java.awt.TextField celda70;
    private java.awt.TextField celda71;
    private java.awt.TextField celda72;
    private java.awt.TextField celda73;
    private java.awt.TextField celda74;
    private java.awt.TextField celda75;
    private java.awt.TextField celda76;
    private java.awt.TextField celda77;
    private java.awt.TextField celda78;
    private java.awt.TextField celda79;
    private java.awt.TextField celda8;
    private java.awt.TextField celda80;
    private java.awt.TextField celda81;
    private java.awt.TextField celda9;
    private javax.swing.JMenu informacion;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem elegirDif;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JButton termine;
    private javax.swing.JMenuItem verificar;
    // End of variables declaration//GEN-END:variables
}
